/*! \file WindowImpl.h
 *	\brief <write description for WindowImpl.h>
 *
 *	created:	2010/03/11
 *	created:	11:3:2010   1:19
 *	filename: 	c:\src\tactics-engine\libs\app_unix\WindowImpl.h
 *	file path:	c:\src\tactics-engine\libs\app_unix
 *	file base:	WindowImpl
 *	file ext:	h
 *	author:		Vitalii Trubchaninov
 *				venngraydog@gmail.com
 */

#ifndef _APP_UNIX_WINDOWIMPL_H_
#define _APP_UNIX_WINDOWIMPL_H_

#pragma once

#include "core/String.h"
#include "app/WindowImpl.h"

namespace tt{
namespace app_unix{

class WindowImpl : public app::WindowImpl
{
public:
	WindowImpl(void*);
	virtual ~WindowImpl();

	HWND hWnd() const;

private:
	String getAppClassName() const;
	void registerClass();
	void createWindow(const app::WindowBounds&);

private:
	virtual void onCreate(const app::WindowBounds&);
	virtual void onShow(app::WindowShowType);
	virtual bool onUpdate();
	virtual app::WindowBounds onBounds() const;

private:
	LRESULT onWndProc(UINT message, WPARAM wParam, LPARAM lParam);

private:
	static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);

private:
	void* m_hInstance;
	HWND m_hWnd;
};

} //namespace app_unix
} //namespace tt

#endif //_APP_WIN_WINDOWIMPL_H_
